package com.mytest.leetcode;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class Solution557 {

    public static void main(String[] args) {
        Solution557 solution344 = new Solution557();
        char[] s = {'h','e','l','l','o'};
        solution344.reverseString(s);
        log.info("{}", s);
    }
    public void reverseString(char[] s) {

        int i = 0;
        int j = s.length -1;
        while(i<j){
            char temp = s[i];
            s[i] =  s[j];
            s[j] = temp;
            i++;
            j--;
        }

    }
}
